var preApi = '';

function unSerializeArray(data){
    var obj = {};
    data.forEach(function(item){
        var key = item.name;
        var val = item.value;
        obj[key] = val;
    });
    return obj;
}

$('#goBack').click(function(){
    window.history.go(-1);
});

function checkLogin(){
    var cookie = document.cookie;
    cookie = cookie.split('; ');
    var obj = {};
    cookie.forEach(function(item){
        var key = item.split('=')[0];
        var val = item.split('=')[1];
        obj[key] = decodeURIComponent(val);
    });
    return obj ? obj : false;
}